package org.melanesia.beans;

import java.util.Map;

class MapSetter implements Setter {

    private String property;

    MapSetter(String property) {
        this.property = property;
    }
    
    @Override
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public void set(Object bean, Object value, Map<String, Class<?>> intermediateBeanClasses) {
        ((Map)bean).put(property, value);
    }

    @Override
    public Class<?> getAcceptedType() {
        return Object.class;
    }

}
